package com.qbw.core.model;

import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;
import android.view.ViewGroup;

import com.qbw.app.BR;


/**
 * @author qinbaowei
 * @createtime 2017/04/24 11:15
 * @email qbaowei@qq.com
 * @description 没有数据的视图模型
 */


public class Empty extends BaseObservable {
    /**
     * 错误码
     */
    private int code;
    /**
     * 属于哪个个模块
     */
    private int moudleId;
    /**
     * 高度默认为match
     */
    private int height = ViewGroup.LayoutParams.MATCH_PARENT;
    /**
     * 垂直间距默认没有间距
     */
    private int paddingVertical;

    public Empty() {
    }

    public Empty(int code) {
        this.code = code;
    }

    public Empty(int code, int moudleId) {
        this.code = code;
        this.moudleId = moudleId;
    }

    public Empty(int code, int moudleId, int height) {
        this.code = code;
        this.moudleId = moudleId;
        this.height = height;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public int getMoudleId() {
        return moudleId;
    }

    public void setMoudleId(int moudleId) {
        this.moudleId = moudleId;
    }

    @Bindable
    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
        notifyPropertyChanged(BR.height);
    }

    @Bindable
    public int getPaddingVertical() {
        return paddingVertical;
    }

    public void setPaddingVertical(int paddingVertical) {
        this.paddingVertical = paddingVertical;
        notifyPropertyChanged(BR.paddingVertical);
    }
}
